package net.controller;

import net.ko.validation.KValidator;

public class KValidateDemande extends KValidator {
	
	public void validateDescription(){
		String description=getValue("description");
		
		if(description==null){
			setOnError(true);
		}else{
			onValid(description);
		}
	}
	
	

	@Override
	protected void onError(String fieldName) {
		addJSContent("show($('errors'),true);");
	}

	@Override
	protected void onValid(String fieldName) {
		addJSContent("show($('errors'),false);");
	}

}
